<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/9/4
 * Time: 11:24
 */

namespace app\admin\controller;

use \ArrayAccess;
use think\Exception;

class TestController
{


    public function index(){
       try{
           throw new Exception('hello',2200);
       }catch (\Exception $e){
           $first=1;
           $contents = file($e->getFile());
           $source   = [
               'first'  => $first,
               'source' => array_slice($contents, $first - 1, 19),
           ];
           var_dump($source);
       }
    }

/*    private $configs            =   [];

    public function offsetGet($key)
    {
        // TODO: Implement offsetGet() method.
    }



    public function offsetSet($key, $value)
    {
        // TODO: Implement offsetSet() method.
    }



    public function offsetExists($key)
    {
        // TODO: Implement offsetExists() method.
    }


    public function offsetUnset($key)
    {
        // TODO: Implement offsetUnset() method.
    }*/

}